<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/

$router->get('/', function () use ($router) {
    return $router->app->version();
});

$router->post('create/index', 'Home\EsController@createIndex'); # 创建索引
$router->delete('delete/index', 'Home\EsController@deleteIndex'); # 删除索引
$router->put('create/doc', 'Home\EsController@createDoc'); # 创建文档
$router->get('search/doc', 'Home\EsController@searchDoc'); # 搜索文档
$router->get('select/index', 'Home\EsController@selectIndex'); # 查看索引
